package com.leyou.controller;

import com.leyou.service.UploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * @version V1.0
 * @author: Ljxpa
 * @date: 2020/03/04 21:48
 * @description: 接收前端请求，返回上传对象到阿里云OSS所需要的签名
 */
@RestController
public class UploadController {

	@Autowired
	private UploadService uploadService;

	@GetMapping("/signature")
	public ResponseEntity<Map<String,Object>> upload(){
		return ResponseEntity.ok(uploadService.getSignature());
	}
}
